package com.bw.controller;

import com.bw.entity.Configuration;
import com.bw.entity.Pojectuser;
import com.bw.entity.TbRule;
import com.bw.service.PojectuserService;
import com.bw.service.RuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class PojectuserController {
    @Autowired
    private PojectuserService pojectuserService;

    //项目使用统计列表
    @RequestMapping("pojectuserlist")
    public List<Pojectuser> pojectuserlist(){
        return pojectuserService.pojectuserlist();
    }

    @RequestMapping("configurationlist")
    public List<Configuration> configurationlist(@RequestParam("pid") int pid){
        return pojectuserService.configurationlist(pid);
    }

}
